package com.myspace.server.blog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 文章详情
 * @author peng.zhang
 */
@Data
@TableName("blog_article_detail")
@ApiModel(value = "ArticleDetail", description = "文章详情实体！")
public class ArticleDetail {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "文章ID")
    private Long id;

    @TableField("category_id")
    @ApiModelProperty(value = "分类 ID")
    private Long categoryId;

    @TableField("article_id")
    @ApiModelProperty(value = "ES 中文章 ID")
    private String articleId;

    @TableField("article_title")
    @ApiModelProperty(value = "文章标题")
    private String articleTitle;

    @TableField(exist = false)
    @ApiModelProperty(value = "文章简介")
    private String articleContentHeader;

    @TableField("article_content")
    @ApiModelProperty(value = "文章内容")
    private String articleContent;

    @TableField("tags")
    @ApiModelProperty(value = "文章标签 (split by comma)")
    private List<String> tags;

    @TableField("is_original")
    @ApiModelProperty(value = "是否原创")
    private Boolean isOriginal;

    @TableField("create_time")
    @ApiModelProperty(value = "文章创建时间")
    private LocalDateTime createTime;

}
